import java.util.ArrayList;
import java.util.List;

public class SkipList<E> {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }

    private SkipListNode<Void> head;
    private int level;

    public static final SkipListNode<Void> NULLNODE = new SkipListNode<>();
    public static boolean isNullNode(SkipListNode node){
        return node == NULLNODE;
    }
    private static final int MAX_LEVEL = 32;
    

    public SkipList(){
        this.head = new SkipListNode<>();
        for(SkipListNode next:head.nexts){
            next = NULLNODE;
        }
        this.level = 1;
    }

    public static class SkipListNode<E> {
        int key;
        E value;
        SkipListNode<E>[] nexts;
        
        public SkipListNode(){}
        public SkipListNode(int key,E value,SkipListNode<E>[] nexts){
            this.key = key;
            this.value = value;
            this.nexts = new SkipListNode<>[MAX_LEVEL];
            assert nexts.length<=MAX_LEVEL;
            for(int i=0;i<nexts.length;i++){
                this.nexts[i] = nexts[i];
            }
        }
    
        public SkipListNode(int key,E value){
            this.key = key;
            this.value = value;
            this.nexts = new SkipListNode<>[MAX_LEVEL];
        }

        public int getKey(){
            return this.key;
        }
        public E getValue(){
            return this.value;
        }

        public SkipListNode<E>[] getNexts(){
            return this.nexts;
        }

    }
}

